import request from '@/utils/request'

// 查询内部机构列表
export function listInternalBase(query) {
  return request({
    url: '/base/internalBase/list',
    method: 'get',
    params: query
  })
}

// 查询内部机构详细
export function getInternalBase(id) {
  return request({
    url: '/base/internalBase/' + id,
    method: 'get'
  })
}

// 保存内部机构
export function saveInternalBase(data) {
  return request({
    url: '/base/internalBase/save',
    method: 'post',
    data: data
  })
}

// 删除内部机构
export function delInternalBase(id) {
  return request({
    url: '/base/internalBase/' + id,
    method: 'delete'
  })
}

// 导出内部机构
export function exportInternalBase(query) {
  return request({
    url: '/base/internalBase/export',
    method: 'get',
    params: query
  })
}

// 校验全称是否已存在
export function checkfullName(query) {
  return request({
    url: '/base/internalBase/checkfullName/',
    method: 'get',
    params: query
  })
}

// 查询内部机构(仅ID和机构全称)
export function findInternal(params) {
  return request({
    url: '/base/internalBase/findInternal',
    method: 'get',
    params: params
  })
}

export function findInternalLimit(data) {
  return request({
    url: '/base/internalBase/findInternalLimit',
    method: 'post',
    data: data
  })
}

// 根据内部机构id查询关联的投资项目信息
export function findDealInvestProject(query) {
  return request({
    url: '/base/internalBase/findDealInvestProject',
    method: 'get',
    params: query
  })
}

// 根据内部机构id查询对应基金出资信息
export function findFundInvestor(query) {
  return request({
    url: '/base/internalBase/findFundInvestor',
    method: 'get',
    params: query
  })
}

